package com.woniuxy.commons.entity.wyh;

import com.woniuxy.commons.entity.AnswerSheet;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName SchoolAndScore
 * @Author weizihan
 * @Date 2020/7/31 10:26
 * @Version 1.0
 **/
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SchoolAndScore implements Comparable, Serializable {
    private Integer schoolId;   //学校id
    private Integer grade;      //界
    private double ontPass;     //未通过率
    private double  regular;    //本科升学率
    private double specialty;   //专业升学率
    private double heavy;       //重本升学率
    private Integer ontPassnumber;  //未通过人数
    private Integer regularnumber; //本科人数
    private Integer specialtynumber;//专科人数
    private Integer heavynumber; //重本人数


    @Override
    public int compareTo(Object o) {
        return this.grade > ((SchoolAndScore)o).getGrade() ? -1 :
               this.grade < ((SchoolAndScore)o).getGrade()? 1:
                       this.grade == ((SchoolAndScore)o).getGrade() ? this.heavynumber >((SchoolAndScore)o).getHeavynumber()? -1 : 1:0;
    }
}
